import React, {Component} from 'react';
import nullImg from 'images/nulldata.png'

class NullDataPage extends Component {

  constructor(props) {
    super(props);
  }

  render() {
    const {tipText, children, notNull} = this.props;
    const boxStyle = {
      display: 'flex',
      justifyContent: 'center',
      alignItems: 'center',
      height: '100vh'
    }
    const contentStyle = {
      fontFamily: 'PingFangSC-Medium',
      fontSize: 28,
      color: '#B5C0CE',
      width: 285,
      marginLeft: 113,
    }
    return (
      <div>
        {!notNull && (
          <div style={boxStyle}>
            <img src={nullImg}/>
            <h3 style={contentStyle}>{tipText}</h3>
          </div>
        )}
        {notNull && children}
      </div>
    )
  }

}

export default NullDataPage;
